```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI与Apache ECharts打造专业数据可视化</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
            background-color: #f8fafc;
        }
        .hero {
            background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
            color: white;
        }
        .chart-container {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            border-radius: 0.5rem;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        .chart-container:hover {
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            transform: translateY(-2px);
        }
        .feature-card {
            transition: all 0.3s ease;
            border-radius: 0.5rem;
            overflow: hidden;
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        }
        .section-title {
            position: relative;
            display: inline-block;
        }
        .section-title:after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, #3b82f6, #6366f1);
            border-radius: 2px;
        }
        .step-number {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, #3b82f6, #6366f1);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-right: 12px;
        }
        .code-block {
            background-color: #1e293b;
            color: #f8fafc;
            border-radius: 0.5rem;
            position: relative;
        }
        .code-block:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 40px;
            background-color: #334155;
            border-radius: 0.5rem 0.5rem 0 0;
        }
        .code-block:after {
            content: '';
            position: absolute;
            top: 12px;
            left: 15px;
            width: 12px;
            height: 12px;
            background-color: #ef4444;
            border-radius: 50%;
            box-shadow: 20px 0 0 #fbbf24, 40px 0 0 #22c55e;
        }
    </style>
</head>
<body class="min-h-screen">
    <!-- Hero Section -->
    <section class="hero py-20 px-4">
        <div class="max-w-6xl mx-auto text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-6 animate-fade-in-down">AI与Apache ECharts打造专业数据可视化</h1>
            <p class="text-xl md:text-2xl max-w-3xl mx-auto mb-8 opacity-90">让海量数据通过智能可视化讲述精彩故事</p>
            <div class="flex justify-center space-x-4">
                <a href="#why" class="px-6 py-3 bg-white text-blue-600 font-medium rounded-full hover:bg-gray-100 transition duration-300">
                    了解优势 <i class="fas fa-arrow-down ml-2"></i>
                </a>
                <a href="#how" class="px-6 py-3 border border-white text-white font-medium rounded-full hover:bg-white hover:bg-opacity-10 transition duration-300">
                    快速开始 <i class="fas fa-play ml-2"></i>
                </a>
            </div>
        </div>
    </section>

    <!-- Introduction Section -->
    <section class="py-16 px-4 max-w-6xl mx-auto">
        <div class="grid md:grid-cols-2 gap-12 items-center">
            <div>
                <h2 class="text-3xl font-bold mb-6">数据可视化的新时代</h2>
                <p class="text-lg mb-6">在数据驱动的开发场景中，程序员常常需要将海量数据转化为直观的可视化图表，以满足业务报表、学术论文或前端展示的需求。无论是展示销售趋势、分析用户行为，还是呈现科研结果，专业图表都能让复杂信息一目了然。</p>
                <p class="text-lg">然而，传统图表开发往往涉及繁琐的代码调试、工具配置或设计调整，耗时耗力，尤其是对时间紧迫或前端经验有限的开发者而言，效率成为瓶颈。AI与Apache ECharts的结合，为这一痛点提供了高效解决方案。</p>
            </div>
            <div class="chart-container bg-white p-4">
                <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1754444436753-dcc7535e-bf85-40e7-8d68-3edcbd868f0d.png" alt="ECharts数据可视化示例" class="w-full h-auto rounded-lg">
            </div>
        </div>
    </section>

    <!-- Why ECharts Section -->
    <section id="why" class="py-16 px-4 bg-white">
        <div class="max-w-6xl mx-auto">
            <h2 class="text-3xl font-bold mb-12 text-center section-title">为什么选择Apache ECharts？</h2>
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
                <div class="feature-card bg-white p-6 border border-gray-100">
                    <div class="text-blue-500 mb-4 text-4xl"><i class="fas fa-chart-line"></i></div>
                    <h3 class="text-xl font-bold mb-3">多样化图表</h3>
                    <p>支持基础图表（折线图、柱状图）、统计图表（箱线图）、地理图表（热力图）等，满足趋势分析、数据对比、占比展示等场景。</p>
                </div>
                <div class="feature-card bg-white p-6 border border-gray-100">
                    <div class="text-blue-500 mb-4 text-4xl"><i class="fas fa-mouse-pointer"></i></div>
                    <h3 class="text-xl font-bold mb-3">强大交互功能</h3>
                    <p>内置鼠标悬停、缩放、数据筛选等功能，增强用户体验。例如，悬停数据点可显示详细信息，适合动态展示。</p>
                </div>
                <div class="feature-card bg-white p-6 border border-gray-100">
                    <div class="text-blue-500 mb-4 text-4xl"><i class="fas fa-paint-brush"></i></div>
                    <h3 class="text-xl font-bold mb-3">高度定制化</h3>
                    <p>通过JavaScript配置项，可调整颜色、字体、坐标轴、动画等，适配不同UI风格（如企业级深色主题、学术简洁风格）。</p>
                </div>
                <div class="feature-card bg-white p-6 border border-gray-100">
                    <div class="text-blue-500 mb-4 text-4xl"><i class="fas fa-mobile-alt"></i></div>
                    <h3 class="text-xl font-bold mb-3">跨平台支持</h3>
                    <p>兼容PC、平板、手机，支持导出PNG/JPG图片，便于嵌入文档或PPT。</p>
                </div>
                <div class="feature-card bg-white p-6 border border-gray-100">
                    <div class="text-blue-500 mb-4 text-4xl"><i class="fas fa-lock-open"></i></div>
                    <h3 class="text-xl font-bold mb-3">开源免费</h3>
                    <p>无版权限制，适合个人项目、商业开发和学术研究。</p>
                </div>
                <div class="feature-card bg-white p-6 border border-gray-100">
                    <div class="text-blue-500 mb-4 text-4xl"><i class="fas fa-bolt"></i></div>
                    <h3 class="text-xl font-bold mb-3">性能优化</h3>
                    <p>基于Canvas/SVG渲染，处理大规模数据仍保持流畅。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- How To Section -->
    <section id="how" class="py-16 px-4 max-w-6xl mx-auto">
        <h2 class="text-3xl font-bold mb-12 section-title">开发流程</h2>
        
        <div class="mb-16">
            <h3 class="text-2xl font-bold mb-8">1. 获取ECharts基础代码</h3>
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <div class="flex items-start mb-6">
                        <div class="step-number">1</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">访问官网</h4>
                            <p>打开Apache ECharts官网。若英文界面不习惯，点击右上角切换为中文。</p>
                        </div>
                    </div>
                    <div class="flex items-start mb-6">
                        <div class="step-number">2</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">探索示例库</h4>
                            <p>点击"所有示例"，按图表类型筛选（如折线图用于趋势分析，柱状图用于数值对比，饼图用于占比展示）。优先选择"官方示例"，代码规范且附带注释。</p>
                        </div>
                    </div>
                    <div class="flex items-start mb-6">
                        <div class="step-number">3</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">选择图表类型</h4>
                            <p>以"渐变面积堆叠图"为例，适合展示多组数据的叠加趋势（如多学科成绩对比）。</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="step-number">4</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">复制代码</h4>
                            <p>点击示例左上角"代码编辑"，进入代码编辑界面。全选左侧代码（Ctrl+A），复制（Ctrl+C），确保包含&lt;script&gt;标签和完整配置项。</p>
                        </div>
                    </div>
                </div>
                <div class="chart-container bg-white p-4">
                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1754444147276-15316a84-e5cb-4415-9cc1-f1c0531b5680.png" alt="ECharts代码示例" class="w-full h-auto rounded-lg">
                </div>
            </div>
        </div>

        <div class="mb-16">
            <h3 class="text-2xl font-bold mb-8">2. 用AI生成定制化代码</h3>
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <div class="flex items-start mb-6">
                        <div class="step-number">1</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">准备数据</h4>
                            <p>以Excel或JSON格式整理数据。例如，学生成绩数据包含字段：`学生姓名`、`语文`、`数学`、`英语`、`物理`、`化学`。</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="step-number">2</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">AI指令设计</h4>
                            <p>上传数据文件至AI平台。粘贴复制的ECharts代码，附上以下提示词：</p>
                        </div>
                    </div>
                </div>
                <div class="code-block p-6 pt-16">
                    <pre class="text-sm overflow-x-auto">以下是ECharts.js实现的渐变面积堆叠图代码，请用上传的Excel/JSON数据替换示例数据，生成可直接运行的HTML5代码。要求：1. 浏览器打开可见图表效果；2. 支持保存为图片；3. 使用国内可访问的ECharts.js库（如https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js）；4. 图表标题改为'7班各学科成绩趋势对比'；5. 保留原样式并确保数据正确映射。</pre>
                </div>
            </div>
        </div>

        <div class="mb-16">
            <h3 class="text-2xl font-bold mb-8">3. 本地测试与优化</h3>
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <div class="flex items-start mb-6">
                        <div class="step-number">1</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">保存HTML文件</h4>
                            <p>在VS Code或其他编辑器中新建文件，粘贴AI生成的代码。保存为.html文件（如scores.html），编码选UTF-8避免中文乱码。</p>
                        </div>
                    </div>
                    <div class="flex items-start mb-6">
                        <div class="step-number">2</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">运行测试</h4>
                            <p>双击HTML文件，在浏览器中查看图表效果。若图表未显示，排查问题：确认ECharts库CDN链接有效，检查数据格式，查看浏览器控制台错误日志。</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="step-number">3</div>
                        <div>
                            <h4 class="font-bold text-lg mb-2">代码优化</h4>
                            <p>样式调整、交互增强、响应式适配等。例如添加窗口调整事件，确保图表适配屏幕。</p>
                        </div>
                    </div>
                </div>
                <div class="code-block p-6 pt-16">
                    <pre class="text-sm overflow-x-auto">// 样式调整示例
option = {
    color: ['#80FFA5', '#00DDFF', '#37A2FF'], // 自定义颜色
    textStyle: { fontSize: 14, fontFamily: 'Arial' }
};

// 交互增强示例
option.toolbox = {
    feature: {
        saveAsImage: { title: '保存为图片' },
        dataView: { show: true, readOnly: false }
    }
};

// 响应式适配示例
window.addEventListener('resize', () => myChart.resize());</pre>
                </div>
            </div>
        </div>
    </section>

    <!-- Case Study Section -->
    <section class="py-16 px-4 bg-white">
        <div class="max-w-6xl mx-auto">
            <h2 class="text-3xl font-bold mb-12 text-center section-title">实战案例</h2>
            <div class="grid md:grid-cols-2 gap-12">
                <div>
                    <h3 class="text-2xl font-bold mb-6">7班学生五大学科成绩对比</h3>
                    <div class="mb-8">
                        <h4 class="font-bold text-lg mb-3">1. 数据准备</h4>
                        <p>Excel表格包含：`学生姓名`、`语文`、`数学`、`英语`、`物理`、`化学`。</p>
                        <div class="code-block p-6 pt-16 mt-4">
                            <pre class="text-sm overflow-x-auto">[
    {"姓名": "张三", "语文": 85, "数学": 90, "英语": 88, "物理": 78, "化学": 92},
    {"姓名": "李四", "语文": 78, "数学": 85, "英语": 90, "物理": 82, "化学": 87}
]</pre>
                        </div>
                    </div>
                    <div class="mb-8">
                        <h4 class="font-bold text-lg mb-3">2. 选择图表</h4>
                        <p>在ECharts示例库选择"渐变面积堆叠图"，适合多学科趋势对比。</p>
                    </div>
                    <div class="mb-8">
                        <h4 class="font-bold text-lg mb-3">3. AI指令示例</h4>
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <p>已复制ECharts渐变面积堆叠图代码，请用上传的7班学生成绩数据替换，学科包括语文、数学、英语、物理、化学。要求：1. 图表标题为'7班各学科成绩趋势对比'；2. 使用蓝绿渐变色系；3. 添加平均分参考线；4. 生成可运行的HTML代码，支持图片导出。</p>
                        </div>
                    </div>
                    <div>
                        <h4 class="font-bold text-lg mb-3">4. 优化建议</h4>
                        <div class="code-block p-6 pt-16">
                            <pre class="text-sm overflow-x-auto">// 调整颜色为蓝绿渐变
option.color = ['#00CED1', '#4682B4'];

// 添加平均分参考线
option.yAxis = {
    axisLine: { show: true },
    splitLine: { show: true },
    markLine: {
        data: [{ yAxis: 85, name: '平均分' }] // 示例平均分
    }
};</pre>
                        </div>
                    </div>
                </div>
                <div>
                    <div class="chart-container bg-white p-4 h-full">
                        <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1754444436753-dcc7535e-bf85-40e7-8d68-3edcbd868f0d.png" alt="学生成绩可视化示例" class="w-full h-auto rounded-lg">
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Tips Section -->
    <section class="py-16 px-4 max-w-6xl mx-auto">
        <h2 class="text-3xl font-bold mb-12 section-title">注意事项</h2>
        <div class="grid md:grid-cols-3 gap-8">
            <div class="bg-white p-6 rounded-lg shadow-sm border border-gray-100">
                <div class="text-blue-500 mb-4 text-3xl"><i class="fas fa-lock"></i></div>
                <h3 class="text-xl font-bold mb-3">数据隐私</h3>
                <p>上传敏感数据前匿名化（如用"学生1"替代姓名），避免泄露。</p>
            </div>
            <div class="bg-white p-6 rounded-lg shadow-sm border border-gray-100">
                <div class="text-blue-500 mb-4 text-3xl"><i class="fas fa-code-branch"></i></div>
                <h3 class="text-xl font-bold mb-3">代码管理</h3>
                <p>使用Git版本控制，备份AI生成代码和修改记录，便于迭代。</p>
            </div>
            <div class="bg-white p-6 rounded-lg shadow-sm border border-gray-100">
                <div class="text-blue-500 mb-4 text-3xl"><i class="fas fa-tachometer-alt"></i></div>
                <h3 class="text-xl font-bold mb-3">性能优化</h3>
                <p>大数据量时启用large:true优化渲染，按需加载ECharts模块减少文件体积。</p>
            </div>
        </div>
    </section>

    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true
            }
        });
    </script>
</body>
</html>
```